﻿<!DOCTYPE html>
<html>
<head>
    <!-- Required meta tags always come first -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <link href="https://sealreport.org/demo/Images/favicon.ico" rel="shortcut icon" type="image/x-icon" />

    <title>Seal Web Interface</title>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

    <!-- jQuery first, then Bootstrap JS. -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>

    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

    <style>
        body {
            padding-top: 60px;
        }

        table th {
            width: 70px;
        }
    </style>
</head>
<body>
    <nav class="navbar-inverse navbar-fixed-top">
        <div class="container">
            <a class="navbar-brand" href="#">Seal Web Interface</a>
            <ul class="nav navbar-nav pull-xs-right">
                <li class="nav-item"><a class="nav-link" href="WebInterfaceSamples.html">Samples</a></li>
                <li class="nav-item active"><a class="nav-link" href="WebInterfaceAPI.html">API Description</a></li>
                <li class="nav-item"><a class="nav-link" href="https://sealreport.org/" target="_blank">Seal Report Home</a></li>
            </ul>
        </div><!-- /.container -->
    </nav><!-- /.navbar -->

    <div class="container">

        <div class="col-lg-12">
            <h2>Seal Web Interface Version</h2>
        </div>
        <div class="col-lg-12">
            <h2>SWIGetVersions</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Returns the version of the Seal Web Interface and the version of the Seal Library.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
<pre>
$.post("https://sealreport.org/demo/SWIGetVersions")
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            SWIVersion (string) : Seal Web Interface version<br />
                            SRVersion (string) : Seal library version
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>


        <div class="col-lg-12">
            <h2>SWILogin</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Start a session with the Web Report Server using the user name and password (may be optional according to the authentication configured on the server) and returns information of the logged user.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWILogin", {
    user: "the user name", // The user name
    password: "the password", // The password
    token: "an authentication token" // Optional token that can be used in the Security Provider Script
})
.done(function (data) {
        if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            name (string) : the user name<br />
                            group (string) :  the user's group names<br />
                            culture (string) : the user's culture name<br />
                            folder (string) : the last folder viewed by the user<br />
                            showfolders (boolean) : true if the user can view the folders<br />
                            editprofile (boolean) : true if the user can edit his profile<br />
                            usertag (string) : custom tag string (e.g. may be used to show a photo of the user)<br />
                            onstartup (integer): action taken after the login (0=Default, 1=Do not execute report, 2=Execute the last report, 3=Execute a specific report)<br />
                            startupreport (string): if onstartup=3, specific report to execute<br />
                            startupreportname (string): if onstartup=3, specific report name<br />
                            report (string): if set, the last report to execute after the login<br />
                            reportname (string): if set, the last report name  executed after the login<br />
                            executionmode (integer): execution mode (0=Default thus from group, 1=New Window , 2=Same Window , 3=Always New Window) <br />
                            groupexecutionmode (integer): group execution mode<br />
                            sources ([MetaSource]): array of MetaSource with their connection names and identifiers<br />
                            sessionId (string): the identifier of the user's session'<br />
                            error (string) : if any error, the error description<br />
                            securitycoderequired (boolean): true if the Two-Factor Authentication is enabled
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWICheckSecurityCode</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Check the security code if the Two-Factor Authentication has been enabled.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWICheckSecurityCode", {
    code: "the security code", // The security code generated in the 'TwoFAGenerationScript' Script after a call to SWILogin()
})
.done(function (data) {
        if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            name (string) : the user name<br />
                            group (string) :  the user's group names<br />
                            culture (string) : the user's culture name<br />
                            folder (string) : the last folder viewed by the user<br />
                            showfolders (boolean) : true if the user can view the folders<br />
                            editprofile (boolean) : true if the user can edit his profile<br />
                            usertag (string) : custom tag string (e.g. may be used to show a photo of the user)<br />
                            onstartup (integer): action taken after the login (0=Default, 1=Do not execute report, 2=Execute the last report, 3=Execute a specific report)<br />
                            startupreport (string): if onstartup=3, specific report to execute<br />
                            startupreportname (string): if onstartup=3, specific report name<br />
                            report (string): if set, the last report to execute after the login<br />
                            reportname (string): if set, the last report name  executed after the login<br />
                            executionmode (integer): execution mode (0=Default thus from group, 1=New Window , 2=Same Window , 3=Always New Window) <br />
                            groupexecutionmode (integer): group execution mode<br />
                            sources ([MetaSource]): array of MetaSource with their connection names and identifiers<br />
                            sessionId (string): the identifier of the user's session'<br />
                            error (string) : if any error, the error description<br />
                            login : true if the login has be re-done
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWILogout</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Clear the current user session.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
<pre>
$.post("https://sealreport.org/demo/SWILogout")
.done(function (data) {
        if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIGetRootFolders</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Returns all the folders of the user (including Personal folders).</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
<pre>
$.post("https://sealreport.org/demo/SWIGetRootFolders", {
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            path (string) : the folder path<br />
                            name (string) : the translated folder name<br />
                            fullname (string): the full path translated of the folder<br />
                            right (integer): folder right (0=No right, 1=Execute reports / View files, 2=Execute reports and outputs / View files, 3=Edit schedules / View files, 4=Edit reports / Manage files)<br />
                            expand (boolean): true if the folder must be expanded in the tree view<br />
                            manage (integer): manage flag for the folder (0=Do not manage sub-folders, 1=Manage sub-folders only as they are defined by the security (no rename or delete allowed), 2=Manage all: create, delete and rename sub-folders<br />
                            folders ([folder]): array of children folders<br />
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIGetFolderDetail</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Returns the list of file names and details contained in a folder.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIGetFolderDetail", {
    path: "\\", // The path of the folder
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            folder (folder): the current folder description<br />
                            files ([file]): array of files<br />
                            error (string): if any error, the error description<br /><br />
                        </td>
                    </tr>
                    <tr>
                        <th>file</th>
                        <td>
                            path (string): the file path<br />
                            name (string): the translated file name<br />
                            last (string): the last modification date and time<br />
                            isreport (boolean): true if the file is a report<br />
                            right (int): right applied to the folder (0=Execute reports, 1=Execute reports, 2=Schedule reports, 3=Edit reports)<br />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWISearch</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Returns the list of file names and details matching a search in the repository.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWISearch", {
    path: "\\", // The path of the folder to start the search
    pattern: "re", // Pattern contained in the file name of the files returned
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            files ([file]): array of files<br />
                            error (string): if any error, the error description<br /><br />
                        </td>
                    </tr>
                    <tr>
                        <th>file</th>
                        <td>
                            path (string): the file path<br />
                            name (string): the translated file name<br />
                            last (string): the last modification date and time<br />
                            isreport (boolean): true if the file is a report<br />
                            right (int): right applied to the folder (0=Execute reports, 1=Execute reports, 2=Schedule reports, 3=Edit reports)<br />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIGetReportDetail</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Returns the views and outputs of a report.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIGetReportDetail", {
    path: "\\", // The path of the report
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            views ([view]): array of views<br />
                            outputs ([output]): array of outputs<br />
                            error (string): if any error, the error description
                        </td>
                    </tr>
                    <tr>
                        <th>view</th>
                        <td>
                            guid (string): the unique identifier of the output<br />
                            name (string): the output name <br />
                            displayname (string): the output name translated
                        </td>
                    </tr>
                    <tr>
                        <th>output</th>
                        <td>
                            guid (string): the unique identifier of the view<br />
                            name (string): the view name <br />
                            displayname (string): the view name translated
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWExecuteReportToResult</h2>
            <table class="table table-striped">
                <tbody>
                    <tr>
                        <th>Description</th>
                        <td>
                            Execute a report into a report result and returns the result.<br /><br />
                            Custom restriction values can be set for the execution if they are prompted in the report.<br />
                            In this case the parameters must be prefixed with <b>r0_</b> (for the restriction 0) with the following suffixes:<br />
                            <b>name</b> for the name of the restriction.<br />
                            <b>operator</b> for the operator applied:<br />
                            Equal, NotEqual, Greater, GreaterEqual, Smaller, SmallerEqual, Between,
                            NotBetween,
                            Contains,
                            NotContains,
                            StartsWith,
                            EndsWith,
                            IsEmpty,
                            IsNotEmpty,
                            IsNull,
                            IsNotNull.<br />
                            <b>value_1</b> to <b>value_4</b> if the restriction is not an enumerated list (date format is YYYYMMDD hh:mm:ss).<br />
                            <b>enum_values</b> containing the list of enumerated identifiers separated by commas if the restriction is an enumerated list.<br />
                            <br />
                            Several restrictions can be defined by changing the prefix index.<br />
                            An optional parameter <b>use_default_restrictions</b> (default value is false) can be to true to force the use of the default values for custom restrictions not specified.
                        </td>
                    </tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
    var f = $('&lt;form method="post" target="_blank" />').appendTo('body');
    f.attr('action', sealServer + "SWExecuteReportToResult");
    f.append($('&lt;input/>').attr('name', 'path').attr('value', path));  //the report path, if empty the report definition must be specified
    f.append($('&lt;input />').attr('name', 'render').attr('value', JSON.stringify(render))); //true if the report can be rendered (this option is used only if report definition is specified)
    f.append($('&lt;input />').attr('name', 'viewGUID').attr('value', viewGUID)); //optional, the view GUID to execute in the report
    f.append($('&lt;input />').attr('name', 'outputGUID').attr('value', outputGUID)); //optional, the output GUID to execute in the report
    f.append($('&lt;input />').attr('name', 'format').attr('value', "html"));  // optional, html by default, print, Excel, PDF, csv, text, XML, Json, etc.

    //optional restriction values if defined as prompted in the report
    f.append($('&lt;input />').attr('name', 'use_default_restrictions').attr('value', "true")); //true -> e.g. for '"\\Search - Orders.srex', existing country values defined in the report will be used
    f.append($('&lt;input />').attr('name', 'r0_name').attr('value', "Quantity"));
    f.append($('&lt;input />').attr('name', 'r0_operator').attr('value', "Between"));
    f.append($('&lt;input />').attr('name', 'r0_value_1').attr('value', "34"));
    f.append($('&lt;input />').attr('name', 'r0_value_2').attr('value', "123"));
    f.append($('&lt;input />').attr('name', 'r1_name').attr('value', "Category"));
    f.append($('&lt;input />').attr('name', 'r1_operator').attr('value', "Equal"));
    f.append($('&lt;input />').attr('name', 'r1_enum_values').attr('value', "2,3,4,7"));
    f.append($('&lt;input />').attr('name', 'r2_name').attr('value', "Order Date"));
    f.append($('&lt;input />').attr('name', 'r2_operator').attr('value', "Equal"));
    f.append($('&lt;input />').attr('name', 'r2_value_1').attr('value', "19940809 00:00:00"));
    f.append($('&lt;input />').attr('name', 'r2_value_2').attr('value', "19940810 00:00:00"));
    f.append($('&lt;input />').attr('name', 'r2_value_3').attr('value', "19940811 00:00:00"));
    f.append($('&lt;input />').attr('name', 'r2_value_4').attr('value', "19940812 00:00:00"));
    f.append($('&lt;input />').attr('name', 'r3_name').attr('value', "Customer Contact"));
    f.append($('&lt;input />').attr('name', 'r3_operator').attr('value', "Contains"));
    f.append($('&lt;input />').attr('name', 'r3_value_1').attr('value', "ar"));
    f.children('input').attr('type', 'hidden');
    f.submit();
</pre>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWExecuteReport</h2>
            <table class="table table-striped">
                <tbody>
                    <tr>
                        <th>Description</th>
                        <td>
                            Execute a report and returns the report html display result content (e.g. html with prompted restrictions).<br />
                            Custom restriction values can be set for the execution if they are prompted in the report as described for SWExecuteReportToResult.<br />
                        </td>
                    </tr>
                    <tr>
                        <th>Call</th>
                        <td>
<pre>
    var f = $('&lt;form method="post" target="_blank" />').appendTo('body');
    f.attr('action', sealServer + "SWExecuteReport");
    f.append($('&lt;input />').attr('name', 'path').attr('value', path));  //the report path, if empty the report definition must be specified
    f.append($('&lt;input />').attr('name', 'render').attr('value', JSON.stringify(render))); //true if the report can be rendered (this option is used only if report definition is specified)
    f.append($('&lt;input />').attr('name', 'viewGUID').attr('value', viewGUID)); //optional, the view GUID to execute in the report
    f.append($('&lt;input />').attr('name', 'outputGUID').attr('value', outputGUID)); //optional, the output GUID to execute in the report
    f.children('input').attr('type', 'hidden');
    f.submit();
</pre>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIGetUserProfile</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Returns the profile information of the logged user.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
<pre>
$.post("https://sealreport.org/demo/SWIGetUserProfile")
.done(function (data) {
        if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            authenticated (bool): true if the user is authenticated, if false the other properties are not set<br />
                            name (string): the user name<br />
                            group (string):  the user's group names<br />
                            culture (string): the user's culture name<br />
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWISetUserProfile</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Set the culture and the startup report for the logged user.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWISetUserProfile", {
            culture: "it-IT", // the new user's culture name or code
            onStartup: 3, //action taken after the login (0=Default, 1=Do not execute report, 2=Execute the last report, 3=Execute a specific report)
            startupReport: "/Overview - Sales.srex", // if onStartup=3, the report to execute
            startupReportName: "Overview - Sales", // if onStartup=3, the report name to execute
            executionMode: 0, //(0=Default, 1=Execute by default in a new Window, 2=Execute in the same Window, 3=Execute always in a new Window)
            sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
        if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWITranslate</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Translate a text either from the public translations or the repository translations. If the optional parameter instance is not empty, the repository translations are used.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWITranslate", {
    context: "Element", // translation context as defined in Translations.csv or RepositoryTranslations.csv
    instance: "Customers.City",  //optional, translation instance as defined in RepositoryTranslations.csv
    reference: "City", // reference text to translate
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
        if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            text (string): the text translate
                        </td>
                    </tr>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIDeleteFiles</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Delete files or reports from the repository.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIDeleteFiles", {
    paths: "\\report1.srex\n\\report2.srex", // The paths of the files to delete separated by \n
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIMoveFile</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Move a file or a report in the repository.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIMoveFile", {
    source: "\\report.srex", // The path of the report to copy or move
    destination: "\\newname.srex", // The destination path 
    copy: true, //true to copy, false to move
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIViewFile</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>View a file published in the repository.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIViewFile", {
    path: "\\report.htm", // The path of the file to view
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            url (string): the url of the result file<br />
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWICreateFolder</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Create a sub-folder in the repository.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWICreateFolder", {
    path: "\\Samples\\SubFolder", // The path of the folder to create
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIDeleteFolder</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Delete a sub-folder in the repository. The folder must be empty.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIDeleteFolder", {
    path: "\\Samples\\SubFolder", // The path of the folder to delete
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="col-lg-12">
            <h2>SWIRenameFolder</h2>
            <table class="table table-striped">
                <tbody>
                    <tr><th>Description</th><td>Rename a sub-folder in the repository.</td></tr>
                    <tr>
                        <th>Call</th>
                        <td>
                            <pre>
$.post("https://sealreport.org/demo/SWIRenameFolder", {
    source: "\\Samples\\SubFolder", // The path of the folder to rename
    destination: "\\Samples\\NewSubFolder", // The path of the folder to rename
    sessionId: sessionId // The sessionId got from the SWILogin call
})
.done(function (data) {
    if (!data.error) { /* Do your job here */ }
})
</pre>
                        </td>
                    </tr>
                    <tr>
                        <th>Returns</th>
                        <td>
                            error (string): if any error, the error description
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</body>
</html>